import type { QuestionInfoPropsType } from "@/utils/type";
import styles from "./questionInfo.module.scss";
import { defaultInfoProps } from "@/utils/default";






export default function QuestionInfo(props:QuestionInfoPropsType) {
  const {title,desc=''} = {...defaultInfoProps,...props}
  const descList = desc.split('\n')
  return (
    <div className={styles.container}>
      <div className={styles.title}>{title}</div>
      <div className={styles.desc}>
         {descList.map((item,index)=>(
        <span key={index}>
          {index>0 && <br/>}
          {item}
        </span>
      ))}
      </div>
    </div>
  )
}
